﻿<Page x:Class="SGT.ABMProvedoresView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="364" d:DesignWidth="529"
             DataContext="{Binding ABMProvedores, Source={StaticResource Locator}}">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="122*" />
            <ColumnDefinition Width="407*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="36*" />
            <RowDefinition Height="37*" />
            <RowDefinition Height="36*" />
            <RowDefinition Height="36*" />
            <RowDefinition Height="218*" />
        </Grid.RowDefinitions>
        <DataGrid AutoGenerateColumns="False" Grid.Row="4" Name="DGProvedores" Grid.ColumnSpan="2"
                  ItemsSource="{Binding Path=Proveedores,Mode=TwoWay}"
                  SelectedItem="{Binding Path=ProveedorSeleccionado}"  >
            <DataGrid.Columns>
                <DataGridTextColumn Header="Razón Social" Binding="{Binding Path=Nombre}" Width="20*"/>
                <DataGridTextColumn Header="Dirección" Binding="{Binding Path=Direccion}" Width="50*"/>
                <DataGridTextColumn Header="Contacto" Binding="{Binding Path=Contacto}" Width="20*"/>
                <DataGridTextColumn Header="Teléfono" Binding="{Binding Path=Telefono}" Width="20*"/>
                <DataGridTextColumn Header="Id" Binding="{Binding Path=ProveedorID}" Width="*" Visibility="Hidden"/>
            </DataGrid.Columns>
        </DataGrid>



        <Label Content="Razón social:" Name="lblRazon" />
        <Label Content="Dirección:" Grid.Row="1" Name="lblDireccion" />
        <Label Content="Contacto:" Grid.Row="2" Name="lblContacto" />
        <Label Content="Teléfono:" Grid.Row="3" Name="lblTelefono" />
        <TextBox Grid.Column="1" Grid.Row="0" Name="txtRazon" Text="{Binding Path=ProveedorSeleccionado.Nombre}" />
        <TextBox Grid.Column="1" Grid.Row="1" Name="txtDireccion" Text="{Binding Path=ProveedorSeleccionado.Direccion}" />
        <TextBox Grid.Column="1" Grid.Row="2" Name="txtContacto" Text="{Binding Path=ProveedorSeleccionado.Contacto}" />
        <TextBox Grid.Column="1" Grid.Row="3" Name="txtTelefono" Text="{Binding Path=ProveedorSeleccionado.Telefono}" />
    </Grid>
</Page>